﻿using System;
using System.Collections.Generic;
using System.Linq;

using System.Text;
using System.Threading.Tasks;
using WPFDemoMVVM.View;

namespace WPFDemoMVVM.Services
{
    public class UserInputService : IUserInputService
    {
        public string RequestInputBox(string prompt, string title, string text = "")
        {
            var input = new UserInputChildrenView(prompt, title, text);
            var res = input.ShowDialog();
            if (res == true)
            {
                return input.InputBox.Text;
            }
            else
            {
                return null;
            }
        }
    }
}
